package com.util.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;


public interface BasicDao {
	
		public <T> void insert(T t)throws Exception;
	
		public <T> void update(T t) throws Exception;

	    public <T> void merge(T t) throws Exception;
	   
	    public <T> void delete(T t) throws Exception;

	    public <T> void saveOrUpdate(T t) throws Exception;


	    public <T, I extends Serializable> T queryById(Class<T> clazz, I id) throws Exception;

	   
	    public <T> List<T> queryByPage(String hql, int firstResult, int num) throws Exception;

	    public <T> Collection<T> queryByExampleEntity(Class<T> clazz, T exampleEntity, int firstResult,
	            int maxResults) throws Exception;

	    public <T> void deleteAll(Collection<T> entities);

	    public <T> void insertAll(Collection<T> t) throws Exception;
}
